#ifndef SONGDISPLAY_H
#define SONGDISPLAY_H

#include <QWidget>
#include <QTimer>
#include "Notes.h"
#include "structs.h"
#include <QKeyEvent>

class SongDisplay : public QWidget
{
  Q_OBJECT
public:
  SongDisplay(QWidget * parent = 0);
  ~SongDisplay();

  void addNote(Note note);
  void processKeys(bool held = false);

protected:
  void paintEvent(QPaintEvent * event);
  void keyPressEvent(QKeyEvent * event);
  void keyReleaseEvent(QKeyEvent * event);

  std::vector<Note> notes;
  QTimer * updateTimer;
  QTimer * newNotes;
  std::ifstream * song;
  SongData songinfo;
  int lineCount;
  bool keys[5];
private slots:
  void updateNotes();
  void getNotes();

 signals:
  void notesUpdated();

};

#endif
